#ifndef _FUNC_H_
#define _FUNC_h_
#include <algorithm>
#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <vector>
#include <stdio.h>

using namespace std;

#define LOG_FILE "log_file.txt"

vector<std::string> file_one_str_vec;
vector<std::string> file_two_str_vec;
vector<string> vec_tmp;
char cmpy_file_name_1[1024];
char cmpy_file_name_2[1024];
char temp_str[1024];

//������߲�ͬ
void check_two_vec_diff(vector<string>* vec_one, vector<string>* vec_two) {
	vector<string>::iterator itr;
	vec_tmp.clear();
	vector<string>::iterator first_one = vec_one->begin();
	vector<string>::iterator last_one = vec_one->end()-1;
	vector<string>::iterator first_two = vec_two->begin();
	vector<string>::iterator last_two = vec_one->end()-1;
	set_difference(first_one,last_one,first_two,last_two,inserter(vec_tmp,vec_tmp.begin()));
	itr = vec_tmp.begin();
	while(itr!= vec_tmp.end())
	{
		cout<<*itr<<endl;
		itr++;
	}
}

void log_sta_file(const char* log_file_name)
{
	std::ofstream log_fs;
	time_t time_now;
	string logfilename;
	logfilename.append(log_file_name);
	log_fs.open(logfilename.c_str());
	log_fs<<log_file_name<<"\n";
	log_fs<<ctime(&time_now);
	vector<string>::iterator itr = vec_tmp.begin();
	while(itr!= vec_tmp.end())
	{
		log_fs<<*itr<<"\n";
		itr++;
	}
	log_fs.close();
}



#endif
